<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
	function newState(text) {
		document.getElementById('container').innerHTML = 'New state ' + text;
	}
</script>
</head>

<body>
	<ul>
	<li><a href="#" onclick="newState('correct');">This you can click</a></li>
	<li><a href="#" id='noClickId' onclick="newState('noClickId');">This you cannot click because of id</a></li>
	<li><a href="#" class='noClickClass' onclick="newState('noClickClass');">This you cannot click because of class</a></li>
	</ul>
	<div id='noChildrenOfId'>
		<a href="#" onclick="newState('noChilderOfId');">This you cannot click because of parent id</a>
	</div>
	<div class='noChildrenOfClass'>
		<a href="#" onclick="newState('noChilderOfClass');">This you cannot click because of parent class</a>
	</div>
	<p id='container'></p>
</body>
</html>